describe('index', () => {
	let page, originTestingNum;
	beforeAll(async () => {
		page = await program.reLaunch('/pages/index/index');
		await page.waitFor('view');
		originTestingNum = await page.callMethod('getTestingNum');
	});

	it('check tabar openDialogPage and switchTab and close dialogPage', async () => {
		await page.callMethod('openDialogPagSwitchTab');
		await page.waitFor(4000);
		
		page = await program.currentPage();
		expect(page.path).toBe('pages/index/about');
		const testingNum = await page.callMethod('getTestingNum');
		expect(testingNum).toBe(originTestingNum + 3);
	});
	
	afterAll(async () => {
		page = await program.reLaunch('/pages/index/index');
		await page.waitFor('view');
		await page.callMethod('setTestingNum', originTestingNum);
	});
});